
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Problems · My Study Note</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="yanglonglong">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../工具/" />
    
    
    <link rel="prev" href="First App.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://www.yangllong.top/" target="_blank" class="custom-link">My Blog</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Linux相关/">
            
                <a href="../Linux相关/">
            
                    
                    Linux相关
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Linux相关/make工具的使用.html">
            
                <a href="../Linux相关/make工具的使用.html">
            
                    
                    Make工具的使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../springboot/">
            
                <a href="../springboot/">
            
                    
                    Springboot
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../springboot/springboot一些遇到的问题.html">
            
                <a href="../springboot/springboot一些遇到的问题.html">
            
                    
                    Springboot一些遇到的问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../vue/">
            
                <a href="../vue/">
            
                    
                    Vue
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../vue/vue+ssm跨域问题.html">
            
                <a href="../vue/vue+ssm跨域问题.html">
            
                    
                    Vue+Ssm跨域问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../vue/vue-cli3.html">
            
                <a href="../vue/vue-cli3.html">
            
                    
                    Vue Cli3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../vue/安装vue.html">
            
                <a href="../vue/安装vue.html">
            
                    
                    安装Vue
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../其他/">
            
                <a href="../其他/">
            
                    
                    其他
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../其他/分布式系统.html">
            
                <a href="../其他/分布式系统.html">
            
                    
                    分布式系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../其他/图解http.html">
            
                <a href="../其他/图解http.html">
            
                    
                    图解Http
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../其他/消息队列.html">
            
                <a href="../其他/消息队列.html">
            
                    
                    消息队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../其他/爬虫.html">
            
                <a href="../其他/爬虫.html">
            
                    
                    爬虫
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../刷题/">
            
                <a href="../刷题/">
            
                    
                    刷题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../刷题/NOJ.html">
            
                <a href="../刷题/NOJ.html">
            
                    
                    NOJ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../刷题/leetcode/">
            
                <a href="../刷题/leetcode/">
            
                    
                    Leetcode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../刷题/leetcode/107简单题.html">
            
                <a href="../刷题/leetcode/107简单题.html">
            
                    
                    107简单题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.3.1" data-path="../刷题/leetcode/2两数相加.html">
            
                <a href="../刷题/leetcode/2两数相加.html">
            
                    
                    2两数相加
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3.2" data-path="../刷题/leetcode/3无重复子串的最大长度.html">
            
                <a href="../刷题/leetcode/3无重复子串的最大长度.html">
            
                    
                    3无重复子串的最大长度
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../刷题/扇贝杯csdn.html">
            
                <a href="../刷题/扇贝杯csdn.html">
            
                    
                    扇贝杯Csdn
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../刷题/排序算法.html">
            
                <a href="../刷题/排序算法.html">
            
                    
                    排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../刷题/蓝桥杯.html">
            
                <a href="../刷题/蓝桥杯.html">
            
                    
                    蓝桥杯
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../刷题/蓝桥杯热身赛.html">
            
                <a href="../刷题/蓝桥杯热身赛.html">
            
                    
                    蓝桥杯热身赛
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="../刷题/计算机等级考试(C语言">
            
                <span>
            
                    
                    计算机等级考试(C语言)
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../博客/">
            
                <a href="../博客/">
            
                    
                    博客
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../博客/next主题配置.html">
            
                <a href="../博客/next主题配置.html">
            
                    
                    Next主题配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../博客/一些问题的记录.html">
            
                <a href="../博客/一些问题的记录.html">
            
                    
                    一些问题的记录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../学习java/">
            
                <a href="../学习java/">
            
                    
                    学习Java
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../学习java/AQS.html">
            
                <a href="../学习java/AQS.html">
            
                    
                    AQS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../学习java/HashMap的简单实现.html">
            
                <a href="../学习java/HashMap的简单实现.html">
            
                    
                    HashMap的简单实现
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../学习java/JavaByteCode.html">
            
                <a href="../学习java/JavaByteCode.html">
            
                    
                    JavaByteCode
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../学习java/Java基础.html">
            
                <a href="../学习java/Java基础.html">
            
                    
                    Java基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../学习java/Java多线程.html">
            
                <a href="../学习java/Java多线程.html">
            
                    
                    Java多线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="../学习java/Java多线程并发.html">
            
                <a href="../学习java/Java多线程并发.html">
            
                    
                    Java多线程并发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.7" data-path="../学习java/Java爬虫.html">
            
                <a href="../学习java/Java爬虫.html">
            
                    
                    Java爬虫
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.8" data-path="../学习java/Java集合.html">
            
                <a href="../学习java/Java集合.html">
            
                    
                    Java集合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.9" data-path="../学习java/java常用类.html">
            
                <a href="../学习java/java常用类.html">
            
                    
                    Java常用类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.10" data-path="../学习java/jvm.html">
            
                <a href="../学习java/jvm.html">
            
                    
                    Jvm
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.11" data-path="../学习java/noifelse.html">
            
                <a href="../学习java/noifelse.html">
            
                    
                    Noifelse
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.12" data-path="../学习java/socket.html">
            
                <a href="../学习java/socket.html">
            
                    
                    Socket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.13" data-path="../学习java/一些Java方法.html">
            
                <a href="../学习java/一些Java方法.html">
            
                    
                    一些Java方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.14" data-path="../学习java/一些其他人写的博客.html">
            
                <a href="../学习java/一些其他人写的博客.html">
            
                    
                    一些其他人写的博客
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.15" data-path="../学习java/硬核空间.html">
            
                <a href="../学习java/硬核空间.html">
            
                    
                    硬核空间
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.16" data-path="../学习java/遇到的问题.html">
            
                <a href="../学习java/遇到的问题.html">
            
                    
                    遇到的问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.17" data-path="../学习java/阻塞队列.html">
            
                <a href="../学习java/阻塞队列.html">
            
                    
                    阻塞队列
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="./">
            
                <a href="./">
            
                    
                    安卓开发
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="First App.html">
            
                <a href="First App.html">
            
                    
                    First App
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.9.2" data-path="problems.html">
            
                <a href="problems.html">
            
                    
                    Problems
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../工具/">
            
                <a href="../工具/">
            
                    
                    工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../工具/IDEA.html">
            
                <a href="../工具/IDEA.html">
            
                    
                    IDEA
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../工具/docker.html">
            
                <a href="../工具/docker.html">
            
                    
                    Docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../工具/github.html">
            
                <a href="../工具/github.html">
            
                    
                    Github
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../数据库/">
            
                <a href="../数据库/">
            
                    
                    数据库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../数据库/MVCC.html">
            
                <a href="../数据库/MVCC.html">
            
                    
                    MVCC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../数据库/MySQL.html">
            
                <a href="../数据库/MySQL.html">
            
                    
                    MySQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="../数据库/Redis.html">
            
                <a href="../数据库/Redis.html">
            
                    
                    Redis
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../数据结构知识/">
            
                <a href="../数据结构知识/">
            
                    
                    数据结构知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../数据结构知识/大话数据结构笔记1.html">
            
                <a href="../数据结构知识/大话数据结构笔记1.html">
            
                    
                    大话数据结构笔记1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../数据结构知识/大话数据结构笔记2.html">
            
                <a href="../数据结构知识/大话数据结构笔记2.html">
            
                    
                    大话数据结构笔记2
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../面试笔试/">
            
                <a href="../面试笔试/">
            
                    
                    面试笔试
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../面试笔试/字节跳动5月11日笔试.html">
            
                <a href="../面试笔试/字节跳动5月11日笔试.html">
            
                    
                    字节跳动5月11日笔试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../面试笔试/阿里3月23日笔试.html">
            
                <a href="../面试笔试/阿里3月23日笔试.html">
            
                    
                    阿里3月23日笔试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.3" data-path="../面试笔试/面试突击.html">
            
                <a href="../面试笔试/面试突击.html">
            
                    
                    面试突击
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Problems</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h4 id="&#x4E0D;&#x6E05;&#x695A;&#x4E24;&#x4E2A;&#x8BFB;&#x5361;&#x6570;&#x636E;&#x4E4B;&#x95F4;&#x7684;&#x5173;&#x7CFB;">&#x4E0D;&#x6E05;&#x695A;&#x4E24;&#x4E2A;&#x8BFB;&#x5361;&#x6570;&#x636E;&#x4E4B;&#x95F4;&#x7684;&#x5173;&#x7CFB;</h4>
<p>&#x6570;&#x636E;1&#xFF1A;RFID *05958C94#    &#x5341;&#x4F4D;&#x5341;&#x8FDB;&#x5236;&#x6570;  2492241157</p>
<p>&#x6570;&#x636E;2&#xFF1A;RFID *89FA709E#     &#x5341;&#x4F4D;&#x5341;&#x8FDB;&#x5236;&#x6570; 2658204297</p>
<p>2658204297 &#x8F6C;16&#x8FDB;&#x5236; 9e 70 fa 89 </p>
<p>&#x5389;&#x5BB3;&#x5389;&#x5BB3;</p>
<p>10&#x8FDB;&#x5236;&#x8F6C;16&#x8FDB;&#x5236;&#x4E4B;&#x540E;&#x6309;&#x5B57;&#x8282;&#x9006;&#x5E8F;&#x8BFB;&#x5165;</p>
<p>&#x6211;&#x6765;&#x8F6C;&#x56DE;&#x53BB;</p>
<pre><code class="lang-Java">BigInteger s10 = <span class="hljs-keyword">new</span> BigInteger(<span class="hljs-string">&quot;2492241157&quot;</span>,<span class="hljs-number">10</span>);
String s16 = s10.toString(<span class="hljs-number">16</span>);
StringBuilder to10 = <span class="hljs-keyword">new</span> StringBuilder();
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> i=s16.length()-<span class="hljs-number">1</span>;i&gt;=<span class="hljs-number">0</span>;i-=<span class="hljs-number">2</span>){
    to10.append(s16.charAt(i-<span class="hljs-number">1</span>));
    to10.append(s16.charAt(i));
}
System.out.println(<span class="hljs-string">&quot;&#x5341;&#x8FDB;&#x5236;:&quot;</span>+s10);
System.out.println(<span class="hljs-string">&quot;&#x5341;&#x516D;&#x8FDB;&#x5236;:&quot;</span>+s16);
System.out.println(<span class="hljs-string">&quot;&#x8F6C;&#x6362;&#x540E;:&quot;</span>+to10);
</code></pre>
<p>&#x51FA;&#x73B0;BigInteger&#x7684;&#x683C;&#x5F0F;&#x9519;&#x8BEF;&#xFF0C;&#x4E0D;&#x77E5;&#x9053;&#x4E3A;&#x4EC0;&#x4E48;&#x603B;&#x662F;&#x6709;&#x4E2A;&#x8BFB;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;&#x8F6C;BigInteger</p>
<p>&#x589E;&#x52A0;&#x4E00;&#x4E2A;&#x975E;&#x7A7A;&#x5224;&#x65AD;&#x540E;&#x95EE;&#x9898;&#x89E3;&#x51B3;</p>
<p>&#x627E;&#x5230;&#x539F;&#x56E0;&#x4E86;&#xFF0C;&#x90A3;&#x4E2A;if&#x8BED;&#x53E5;&#x540E;&#x9762;&#x6CA1;&#x6709;&#x5927;&#x62EC;&#x53F7;&#xFF0C;&#x662F;&#x53EA;&#x8DDF;&#x4E86;&#x4E00;&#x6761;&#x7684;&#x3002;&#x3002;&#x3002;</p>
<h5 id="biginteger&#x4E0E;int&#x8F6C;&#x6362;">BigInteger&#x4E0E;int&#x8F6C;&#x6362;</h5>
<pre><code class="lang-Java"><span class="hljs-comment">//BigInteger&#x4E0E;int&#x8F6C;&#x6362;        </span>
<span class="hljs-comment">//int &#x8F6C;&#x6362;&#x4E3A; BigInteger&#x7684;&#x65B9;&#x6CD5;&#xFF1A;</span>
<span class="hljs-keyword">int</span> p = <span class="hljs-number">1</span>;
BigInteger a = BigInteger.valueOf(p);


<span class="hljs-comment">//BigInteger &#x8F6C;&#x6362;&#x4E3A; int&#x7684;&#x65B9;&#x6CD5;&#xFF1A;      </span>
BigInteger d = <span class="hljs-keyword">new</span> BigInteger(<span class="hljs-string">&quot;9&quot;</span>);
<span class="hljs-keyword">int</span> temp = d.intValue();
</code></pre>
<h5 id="string&#x4E0E;int&#x7684;&#x8F6C;&#x6362;">String&#x4E0E;int&#x7684;&#x8F6C;&#x6362;</h5>
<pre><code class="lang-Java"><span class="hljs-comment">//String&#x4E0E;int&#x7684;&#x8F6C;&#x6362;</span>
<span class="hljs-comment">//String&#x8F6C;int</span>
String s = <span class="hljs-string">&quot;123&quot;</span>;
<span class="hljs-keyword">int</span> i  = Integer.parseInt(s);

<span class="hljs-comment">//int&#x8F6C;String</span>
<span class="hljs-keyword">int</span> i = <span class="hljs-number">123</span>;
String s = i+<span class="hljs-string">&quot;&quot;</span>;
</code></pre>
<h5 id="10&#x8FDB;&#x5236;&#x8F6C;16&#x8FDB;&#x5236;">10&#x8FDB;&#x5236;&#x8F6C;16&#x8FDB;&#x5236;</h5>
<pre><code class="lang-Java"><span class="hljs-comment">//10&#x8FDB;&#x5236;&#x8F6C;16&#x8FDB;&#x5236;</span>
<span class="hljs-keyword">int</span> i = <span class="hljs-number">324</span>;
String hex = Integer.toHexString(i);
</code></pre>
<h5 id="&#x5927;&#x5C0F;&#x5199;&#x8F6C;&#x6362;">&#x5927;&#x5C0F;&#x5199;&#x8F6C;&#x6362;</h5>
<pre><code class="lang-Java">String a = <span class="hljs-string">&quot;ABC&quot;</span>;
system.out.println(a.toLowerCase());<span class="hljs-comment">//abc</span>
String b = <span class="hljs-string">&quot;abc&quot;</span>;
system.out.println(b.toUpperCase());<span class="hljs-comment">//ABC</span>
</code></pre>
<h4 id="&#x901A;&#x8FC7;url&#x83B7;&#x53D6;json&#x6570;&#x636E;&#xFF0C;&#x5728;&#x4E00;&#x822C;&#x7684;java&#x7C7B;&#x4E2D;&#x8FD0;&#x884C;&#x6B63;&#x5E38;&#xFF0C;&#x5728;&#x5B89;&#x5353;&#x4E3B;&#x754C;&#x9762;&#x5374;&#x4E0D;&#x884C;">&#x901A;&#x8FC7;url&#x83B7;&#x53D6;json&#x6570;&#x636E;&#xFF0C;&#x5728;&#x4E00;&#x822C;&#x7684;Java&#x7C7B;&#x4E2D;&#x8FD0;&#x884C;&#x6B63;&#x5E38;&#xFF0C;&#x5728;&#x5B89;&#x5353;&#x4E3B;&#x754C;&#x9762;&#x5374;&#x4E0D;&#x884C;</h4>
<p>&#x901A;&#x8FC7;url&#x83B7;&#x53D6;json&#x4EE3;&#x7801;</p>
<pre><code class="lang-Java"><span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> String <span class="hljs-title">loadJson</span> <span class="hljs-params">(String urlStr)</span> </span>{
    <span class="hljs-comment">//&#x8BF7;&#x6C42;&#x7684;url</span>
    URL url = <span class="hljs-keyword">null</span>;
    <span class="hljs-comment">//&#x5EFA;&#x7ACB;&#x7684;http&#x94FE;&#x63A5;</span>
    HttpURLConnection httpConn = <span class="hljs-keyword">null</span>;
    <span class="hljs-comment">//&#x8BF7;&#x6C42;&#x7684;&#x8F93;&#x5165;&#x6D41;</span>
    BufferedReader in = <span class="hljs-keyword">null</span>;
    <span class="hljs-comment">//&#x8F93;&#x5165;&#x6D41;&#x7684;&#x7F13;&#x51B2;</span>
    StringBuilder sb = <span class="hljs-keyword">new</span> StringBuilder();
    <span class="hljs-keyword">try</span>{
        url = <span class="hljs-keyword">new</span> URL(urlStr);
        in = <span class="hljs-keyword">new</span> BufferedReader(<span class="hljs-keyword">new</span> InputStreamReader(url.openStream(), <span class="hljs-string">&quot;UTF-8&quot;</span>) );
        String str = <span class="hljs-keyword">null</span>;
        <span class="hljs-comment">//&#x4E00;&#x884C;&#x4E00;&#x884C;&#x8FDB;&#x884C;&#x8BFB;&#x5165;</span>
        <span class="hljs-keyword">while</span>((str = in.readLine()) != <span class="hljs-keyword">null</span>) {
            sb.append( str );
        }
    } <span class="hljs-keyword">catch</span> (Exception ignored) {
    } <span class="hljs-keyword">finally</span>{
        <span class="hljs-keyword">try</span>{
            <span class="hljs-keyword">if</span>(in!=<span class="hljs-keyword">null</span>) {
                in.close(); <span class="hljs-comment">//&#x5173;&#x95ED;&#x6D41;</span>
            }
        }<span class="hljs-keyword">catch</span>(IOException ignored) {
        }
    }
    <span class="hljs-keyword">return</span> sb.toString();
}
</code></pre>
<p>&#x8C03;&#x7528;</p>
<pre><code class="lang-Java"> String url =  getPropertiesUtil.getNetConfigProperties().getProperty(<span class="hljs-string">&quot;SERVER_URL&quot;</span>) + <span class="hljs-string">&quot;CheckCardIdentity?RFID=&quot;</span> + RFID;
String jsonString = GetData.loadJson(url);<span class="hljs-comment">//&#x8C03;&#x7528;&#x4E0A;&#x9762;&#x7684;&#x51FD;&#x6570;</span>
System.out.println(<span class="hljs-string">&quot;&#x8BF7;&#x6C42;&#x7684;url:&quot;</span> + url);
System.out.println(<span class="hljs-string">&quot;user&#x7684;json&#x5B57;&#x7B26;&#x4E32;&quot;</span> + jsonString);
JSONObject user = JSON.parseObject(jsonString);
System.out.println(<span class="hljs-string">&quot;user&#x7684;json&#x683C;&#x5F0F;&quot;</span> + user);
System.out.println(user.get(<span class="hljs-string">&quot;userName&quot;</span>));
<span class="hljs-comment">//&#x5C55;&#x793A;&#x8BFB;&#x5361;&#x7684;&#x6570;&#x636E;</span>
System.out.println(<span class="hljs-string">&quot;data:&quot;</span> + user.get(<span class="hljs-string">&quot;userName&quot;</span>));
</code></pre>
<p>&#x4F1A;&#x8BBF;&#x95EE;&#x4E0D;&#x5230;json&#x6570;&#x636E;</p>
<p>&#x89E3;&#x51B3;&#x65B9;&#x6CD5;&#xFF1A;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x7EBF;&#x7A0B;&#xFF0C;&#x8BA9;&#x7EBF;&#x7A0B;&#x8BBF;&#x95EE;</p>
<pre><code class="lang-Java"><span class="hljs-keyword">final</span> Thread getUserInfo = <span class="hljs-keyword">new</span> Thread(<span class="hljs-keyword">new</span> Runnable() 
    <span class="hljs-meta">@Override</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">run</span><span class="hljs-params">()</span> </span>{
        <span class="hljs-keyword">try</span> {
            <span class="hljs-comment">//&#x901A;&#x8FC7;&#x5361;&#x53F7;&#x67E5;&#x8BE2;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x7684;url</span>
            String url =  getPropertiesUtil.getNetConfigProperties().getProperty(<span class="hljs-string">&quot;SERVER_URL&quot;</span>) + <span class="hljs-string">&quot;CheckCardIdentity?RFID=&quot;</span> + RFID;
            String jsonString = GetData.loadJson(url);
            JSONObject user = JSON.parseObject(jsonString);
         }<span class="hljs-keyword">catch</span> (Exception e){
             System.out.println(<span class="hljs-string">&quot;Have Exception:&quot;</span>+e.getMessage());
         }
    }
});
<span class="hljs-comment">//&#x542F;&#x52A8;&#x83B7;&#x53D6;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x7684;&#x7EBF;&#x7A0B;</span>
getUserInfo.start();
</code></pre>
<p>&#x8FD8;&#x6709;&#x4E00;&#x4E2A;&#x95EE;&#x9898;</p>
<h4 id="&#x7EBF;&#x7A0B;&#x4E0D;&#x80FD;&#x8C03;&#x7528;&#x90A3;&#x4E2A;&#x5F39;&#x7A97;&#x7684;&#x65B9;&#x6CD5;">&#x7EBF;&#x7A0B;&#x4E0D;&#x80FD;&#x8C03;&#x7528;&#x90A3;&#x4E2A;&#x5F39;&#x7A97;&#x7684;&#x65B9;&#x6CD5;</h4>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="First App.html" class="navigation navigation-prev " aria-label="Previous page: First App">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../工具/" class="navigation navigation-next " aria-label="Next page: 工具">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Problems","level":"1.9.2","depth":2,"next":{"title":"工具","level":"1.10","depth":1,"path":"工具/README.md","ref":"工具/README.md","articles":[{"title":"IDEA","level":"1.10.1","depth":2,"path":"工具/IDEA.md","ref":"工具/IDEA.md","articles":[]},{"title":"Docker","level":"1.10.2","depth":2,"path":"工具/docker.md","ref":"工具/docker.md","articles":[]},{"title":"Github","level":"1.10.3","depth":2,"path":"工具/github.md","ref":"工具/github.md","articles":[]}]},"previous":{"title":"First App","level":"1.9.1","depth":2,"path":"安卓开发/First App.md","ref":"安卓开发/First App.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","-lunr","-sharing","-anchor-navigation-ex","todo","code","-katex","github","-summary","search-pro","chapter-fold","theme-comscore","toggle-chapters","flexible-alerts"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"chapter-fold":{},"github":{"url":"https://github.com/BluePrintYang"},"todo":{},"search-pro":{},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"showLevel":false,"showGoTop":true,"isRewritePageTitle":true,"isShowTocTitleIcon":true,"tocLevel1Icon":"fa fa-hand-o-right","tocLevel2Icon":"fa fa-hand-o-right","tocLevel3Icon":"fa fa-hand-o-right"},"theme-comscore":{},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"Attention"},"note":{"className":"info","icon":"fa fa-info-circle","label":"Note"},"style":"callout","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"Tip"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"Warning"}},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"toggle-chapters":{}},"theme":"default","author":"yanglonglong","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"My Study Note","language":"zh-hans","links":{"sidebar":{"My Blog":"https://www.yangllong.top/"}},"gitbook":"*"},"file":{"path":"安卓开发/problems.md","mtime":"2020-06-29T16:04:36.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-01-14T07:15:50.272Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

